package com.ruoyi.base.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 支付记录日志对象 wx_pay_log
 * 
 * @author 刘大理
 * @date 2025-07-03
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class WxPayLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    @TableId(value = "id", type = IdType.AUTO) // 指定自增策略
    private Long id;

    /** 用户ID */
    private Long baseUserId;

    /** openid */
    @Excel(name = "openid")
    private String openid;

    /** 微信订单ID */
    @Excel(name = "微信订单ID")
    private String transactionId;

    /** 原价 */
    @Excel(name = "原价")
    private Long orgprice;

    /** 实付价 */
    @Excel(name = "实付价")
    private Long curprice;

    /** 交易类型（1.入账 2.出账） */
    @Excel(name = "交易类型", readConverterExp = "1=.入账,2=.出账")
    private String payType;

    /** 订单ID */
    private String orderId;

    /** 请求数据 */
    @Excel(name = "请求数据")
    private String requestBody;

    /** 响应数据 */
    @Excel(name = "响应数据")
    private String responseBody;

    /** 支付状态（0 待支付， 1 支付成功， 2支付失败） */
    @Excel(name = "支付状态", readConverterExp = "0=,待支付,1=,支=付成功，,2=支付失败")
    private String status;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    /** 成功回调时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "成功回调时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payNotifyTime;

    /** 退款回调时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退款回调时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setBaseUserId(Long baseUserId) 
    {
        this.baseUserId = baseUserId;
    }

    public Long getBaseUserId() 
    {
        return baseUserId;
    }

    public void setOpenid(String openid) 
    {
        this.openid = openid;
    }

    public String getOpenid() 
    {
        return openid;
    }

    public void setTransactionId(String transactionId) 
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId() 
    {
        return transactionId;
    }

    public void setOrgprice(Long orgprice) 
    {
        this.orgprice = orgprice;
    }

    public Long getOrgprice() 
    {
        return orgprice;
    }

    public void setCurprice(Long curprice) 
    {
        this.curprice = curprice;
    }

    public Long getCurprice() 
    {
        return curprice;
    }

    public void setPayType(String payType)
    {
        this.payType = payType;
    }

    public String getPayType() 
    {
        return payType;
    }

    public void setOrderId(String orderId) 
    {
        this.orderId = orderId;
    }

    public String getOrderId() 
    {
        return orderId;
    }

    public void setRequestBody(String requestBody) 
    {
        this.requestBody = requestBody;
    }

    public String getRequestBody() 
    {
        return requestBody;
    }

    public void setResponseBody(String responseBody) 
    {
        this.responseBody = responseBody;
    }

    public String getResponseBody() 
    {
        return responseBody;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setPayNotifyTime(Date payNotifyTime) 
    {
        this.payNotifyTime = payNotifyTime;
    }

    public Date getPayNotifyTime() 
    {
        return payNotifyTime;
    }

    public void setRefundTime(Date refundTime) 
    {
        this.refundTime = refundTime;
    }

    public Date getRefundTime() 
    {
        return refundTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("baseUserId", getBaseUserId())
            .append("openid", getOpenid())
            .append("transactionId", getTransactionId())
            .append("orgprice", getOrgprice())
            .append("curprice", getCurprice())
            .append("payType", getPayType())
            .append("orderId", getOrderId())
            .append("requestBody", getRequestBody())
            .append("responseBody", getResponseBody())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .append("payNotifyTime", getPayNotifyTime())
            .append("refundTime", getRefundTime())
            .toString();
    }
}
